﻿using System.ServiceModel;

namespace RemoteWorker
{
	[ServiceContract(CallbackContract = typeof (IWorker), SessionMode = SessionMode.Required)]
	public interface IWorkerServer
	{
        [OperationContract(IsInitiating = true)]
		void Ping(string name);

		[OperationContract(IsInitiating = false, IsTerminating = true, IsOneWay = true)]
		void Disconnect(string name);

		[OperationContract(IsInitiating = false, IsTerminating = false)]
		void SendOutput(string data);

        [OperationContract(IsInitiating = false, IsTerminating = false)]
		void Complite(int exitCode);
	}
}